<?php 
include '../data/data.php';
$user=$_SESSION['user']; //获取到的用户名
$pass=$_SESSION['pass']; //获取到的密码
$result= mysql_query("SELECT * FROM user WHERE username='$user' and password='$pass'", $link);  
$row = mysql_fetch_array($result);
if($row[id]==''){
	header('location:/user/login.html?fwd=/user/feedbackList.html');
}
?>
<html><head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>客服中心 - <?php echo $rowx[name]; ?></title>
    <link rel="stylesheet" href="/public/styles/base.css">
    <link rel="stylesheet" href="/styles/pay_edit.css">
    <link rel="stylesheet" href="/layui/css/layui.css">
    <link rel="stylesheet" href="/css/new.css">
    <style>
        a{color: #0b0b0b!important;text-decoration:underline}
        .layui-input-block {
             margin-left: 0!important;
            min-height: 36px;
        }
        th{
            font-size: 12px;
            color: #333;
            border: none!important;
            text-align: center!important;
        }
        td{
            border: none!important;
            color: #666666;
            font-size: 10px;
            text-align: center;
            padding: 15px!important;

        }
    </style>
<link id="layuicss-layer" rel="stylesheet" href="/layui/css/modules/layer/default/layer.css?v=3.1.1" media="all"></head>
<body style="background-color:#ffffff"><header class="z_header block_bg">
    <div class="toptil">
        <a href="/user/user.html"><img src="/picture/icon_20.png" alt=""></a>
        <p>查看提交</p>
    </div>
</header>


<!--div.container 总外框  start-->
<div style="padding: 16px;">
        <table class="layui-table" lay-skin="line" style="border: none;">

                <colgroup>
                    <col>
                    <col>
                    <col>
                </colgroup>
                <thead>
                <tr style="background: #F4F4F4;">
                    <th style="border-radius:5px 0 0 5px;">标题</th>
                    <th>状态</th>
                    <th style="border-radius:0 5px 5px 0;">新回复</th>
                </tr>
                </thead>
                <tbody>
                                             <?php  
$result = $conn->query("SELECT id, title, han, rep FROM feed WHERE user='$user' ORDER BY id DESC limit 20");
 
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
      if($row[han]=='0'){
      $xtl='未处理';
      }elseif($row[han]=='1'){
      $xtl='<font color="#00CCEE">处理中</font>';
      }elseif($row[han]=='2'){
      $xtl='<font color="red">完成</font>';
      }
      if($row[rep]=='0'){
      $hf='否';
      }else{
      $hf='<font color="red">'.$row[rep].'</font>';
      }
        echo '<tr>
                    <td style="width: 33%">'.$row[title].'</td>
                    <td>'.$xtl.'</td>
                    <td>'.$hf.'</td>
                </tr>';
    }
}else{
   echo '还没有提交问题喔！';
}
?> 
                                </tbody>
        </table>
<!--    <div class="layui-form-item">-->
<!--        <div class="layui-input-block" style="text-align: center">-->
<!--            <a >我已提交的点击查看</a>-->
<!--        </div>-->
<!--    </div>-->
<!--    <div style="float: left">-->
<!--        <image src="/images/login/qq.png" width="20" height="20"></image><a onclick="jump_qq(this)" data-id="--><!--" href="javascript:void(0);">客服:--><!--</a>-->
<!--    </div>-->
<!--        <div style="float: right">-->
<!--            <image src="/images/login/qq.png" width="20" height="20"></image><a onclick="jump_qq(this)" data-id="--><!--" href="javascript:void(0);">玩家群:--><!--</a>-->
<!--        </div>-->
</div>
<!--div.container 总外框  end-->
<script src="/public/scripts/jquery-1.11.1.min.js"></script>
<script src="/public/scripts/jquery.mobile.min.js"></script>
<script src="/layui/layui.js"></script>
<script>
    layui.use(['layer', 'form'], function(){
        var layer = layui.layer
            ,form = layui.form;
    });
    function IsPC() {
        var userAgentInfo = navigator.userAgent;
        var Agents = ["Android", "iPhone",
            "SymbianOS", "Windows Phone",
            "iPad", "iPod"];
        var flag = true;
        for (var v = 0; v < Agents.length; v++) {
            if (userAgentInfo.indexOf(Agents[v]) > 0) {
                flag = false;
                break;
            }
        }
        return flag;
    }
    function jump_qq(obj) {
        var qq = $(obj).attr('data-id');
        if (IsPC()) {
            window.open("http://wpa.qq.com/msgrd?v=3&uin=" + qq + "&site=qq&menu=yes");
        } else {
            window.open("mqqwpa://im/chat?chat_type=wpa&uin=" + qq + "&version=1&src_type=web&web_src=oicqzone.com");
        }
    }
</script>

</body></html>